package com.chris.conference.Class;

import java.sql.Timestamp;

public class SimpleRecord{

    private Integer id;
    private Integer today;
    private Integer start;
    private Integer end;
    private String username;

    public SimpleRecord(Record record){
        this.id = record.getId();
        this.today = record.getStarttime().getDay();
        this.start = timeToSimple(record.getStarttime());
        this.end = timeToSimple(record.getEndtime());
    }

    public Integer getId() {
        return id;
    }

    public Integer getToday() {
        return today;
    }

    public Integer getStart() {
        return start;
    }

    public Integer getEnd() {
        return end;
    }

    public String getUsername() {
        return username;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setToday(Integer today) {
        this.today = today;
    }

    public void setStart(Integer start) {
        this.start = start;
    }

    public void setEnd(Integer end) {
        this.end = end;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    //时间转为简单计数方式
    public Integer timeToSimple(Timestamp timestamp){
        Integer simple = timestamp.getHours() - 8;
        return simple;
    }
}
